package com.hougong.im.body.httpresponse;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.util.Date;

/**
 * 我的基本信息
 */
public class MyBaseInfoVo {
    private String username;
    private String nickname;
    private String avatar;
    private String introduction;
    private Integer sex;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    private Date   birthday;
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }


    public static void main(String[] args) throws JsonProcessingException {
        MyBaseInfoVo vo=new MyBaseInfoVo();
        vo.setUsername("lsz");
        vo.setNickname("sdsds");
        vo.setAvatar("/sdsds/aa.jpg");
        vo.setIntroduction("我就是我");
        vo.setSex(1);
        vo.setBirthday(new Date());
        ObjectMapper mapper = new ObjectMapper();
        try {
            String s = mapper.writeValueAsString(vo);
            System.out.println(s);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }

    }
}
